home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
check160.zip
/
CHECKSYS.DOC
next >
Wrap
Text File
|
1992-07-22
|
6KB
|
144 lines
Command-line diagnostic CHECKSYS.EXE
Dan Shearer, Computer Centre, University of South Australia
Comments and bug reports to: ccdps@lux.levels.unisa.edu.au
I'd appreciate ideas or code for more checks.
Version 1.6 released to the public domain 22nd July, 1992.
Overview
---------
CHECKSYS is a command-line diagnostic program which either gives a short
description of a whole PC system, or returns a one-line description and
gives an errorlevel when asked about one aspect of the system.
The primary intention is for it to be used to determine system configuration
and driver status from batch files. It can also be handy when wanting a
quick idea of what a machine has during a system debugging session
without starting up a complicated package and poking around menus.
Reasoning Behind CHECKSYS
-------------------------
We have a very mixed hardware environment at UniSA, but like to have
generic batch files on the LAN. In our batch file that starts up Windows,
for instance, we have several CHECKSYS calls to determine what mode
Windows should be run in and what hardware drivers are needed, and also
to check and see if Windows is already running.
When to Use CHECKSYS
--------------------
Some things can be detected quite reliably from DOS using an IF EXIST...
test on a driver name. For example, if you have an Etherlink II network
card installed and you know its driver is called ELNKII$ then you can
say something like:
IF EXIST ELNKII$ ECHO There is a 3Com Etherlink II card installed
If you don't know what the driver is called, a simple way to find out is
to use DOS 5's MEM /D command, which lists the names of all drivers loaded.
You can also use this method to determine the existence of extended memory,
expanded memory, and so on. It is a very crude check, no staus info etc but
works quite well. CHECKSYS is for when you need more detail; for
instance, EMM386 and HIMEM might be installed but the HMA not be
available.
How it Works and Acknowledgements
---------------------------------
It is a collection of routines that I have put together in Turbo Pascal
6.0, with assembler routines to check for CPU and FPU. All the detection
calls are in a self-contained TP unit, and I would be willing to release
this to the public domain as well if there was a call for it.
The commandline switch checking code in CHECKSYS is with the kind permission
of Rocky Stone, also of UniSA. Gary Oxton (once a UniSA student) wrote
the basis of the CPU-detection assembler I have used for his final-year
Computer Studies project. I have learnt about checking for memory types
from the InfoPlus source code, by Andrew Rossman and Steve Grant, and
used their LongCall assembler function, which overcomes a shonky nonfeature
of Turbo Pascal 6.0.
Ralf Brown's interrupt list is, of course, absolutely essential.
Syntax
------
CHECKSYS Vers 1.6 (C) 1992 Eyesright
Comments to Dan Shearer, University of South Australia
Dan.Shearer@UniSA.edu.au
CHECKSYS [/switches] where switches for this free software are:
/ALL Displays messages for all tests and returns errorlevel 0
/CPU returns errorlevel 0-8 in order for:
8088, 8086, V20, V30, 80188, 80186, Unknown, 80286, 80386
/EMM returns errorlevel 1 if EMM driver installed
/FTP returns 1 if packet driver responding
/KBD returns errorlevel 1 if extended keyboard installed
/MOUSE returns number of mouse buttons (=0 for no mouse)
/NETBIOS returns errorlevel 1 if NetBIOS responding
/PAR returns number of parallel ports recognised by BIOS
/PROTMAN 1 if Microsoft Network Driver Interface (PROTMAN$) responding
/REMBOOT returns 1 if drive 0 parkable (ie not a network device)
/SER returns number of serial ports recognised by BIOS
/VID returns 1-10 in order for:
CGA, MCGA, EGA, EGA64, EGAMon, 8514, HercMon, ATT400, VGA, PC3270
/WIN returns 0-3 in order for:
Win 3.x (/3), Win 3.x (/R or /S), Win/386 2.x, No Windows
/XMS returns 2 for XMS & HMA avail, 1 for XMS but no HMA, 0 for no XMS
/87 returns 0-3 in order for: 80387, 80287, 8087, None
Each test also displays a detailed message to standard output.
Switches can be abbreviated to 1 letter. Errorlevel 99 for syntax error.
Examples:
CHECKSYS displays the above help message
CHECKSYS /ALL displays detailed results of all tests
CHECKSYS /MOUSE displays detailed info about the mouse, and
returns errorlevels 0 for not present, 2 for two
button mouse present or 3 for three button mouse.
Remember when checking errorlevels in batch files that if a program
returns errorlevel n DOS also returns all other errorlevels from n-1 down
to 0. This is why (for instance) CHECKSYS /WINDOWS returns errorlevel 3 for
no windows and 0 for version 3.x. If it was 0 for no windows, you would
still have to check to see that it wasn't one of the others.
Bugs
----
BIOS is often wrong about printer and comms ports. Could add some better
checks.
The FPU check gives a silly result when used on a NEC V20 chip with an
Intel 8087 installed
Doesn't test for Weitek FPU
Doesn't distinguish OS/2 dos-boxes from Windows dos-boxes
Doesn't test for various network cards
Doesn't test for game port
Doesn't give video chipset particulars (might be useful for running
Windows with specific screen drivers)
Doesn't detect sound cards
Could possibly have a TSR check, ie syntax like:
CHECKSYS <unique TSR signature> [<optional range of interrupts>]